package com.yanqu.road.server.cmd.activity.huashigang;

import com.yanqu.road.entity.scene.UserScene;
import com.yanqu.road.logic.pb.ScenePb;
import com.yanqu.road.pb.huashigang.HuaShiGangProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.manager.cross.battle.HuaShiGangMgr;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.CrossProtocol;

/**
 * @Author wpj
 * @Date 2020/10/14
 */
@Cmd(code = CrossProtocol.C2_HUA_SHI_GANG_GET_MONSTER_DATA, desc = "获取怪物数据")
public class CrossGetMonsterDataCmd extends CrossCommand {

    int activityId;
    UserScene userScene;

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        HuaShiGangProto.CrossGetHuaShiGangMonsterDataReqMsg msg = HuaShiGangProto.CrossGetHuaShiGangMonsterDataReqMsg.parseFrom(packet.getBytes());
        activityId = msg.getActivityId();
        userScene = ScenePb.parseUserScene(msg.getScene());
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        HuaShiGangMgr.getHuaShiGangMonsterData(activityId, serverId, packet.getPlayerId(), userScene);
    }

    @Override
    public void sendData() {

    }


}
